<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>删除作者 - {{ author.name }}</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 20px;
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
        }
        h1 {
            color: #333;
        }
        .warning-message {
            padding: 15px;
            background-color: #ffebee;
            border-left: 4px solid #f44336;
            margin-bottom: 20px;
        }
        .author-info {
            background-color: #f5f5f5;
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 4px;
        }
        .form-actions {
            margin-top: 20px;
        }
        .delete-button {
            background-color: #f44336;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        .cancel-link {
            margin-left: 10px;
            background-color: #9E9E9E;
            color: white;
            padding: 10px 20px;
            text-decoration: none;
            border-radius: 4px;
        }
    </style>
</head>
<body>
    <h1>确认删除作者</h1>
    <div class="warning-message">
        <p><strong>警告:</strong> 此操作不可撤销。删除后，作者的所有数据将被永久移除。</p>
    </div>
    
    <div class="author-info">
        <p><strong>作者名称:</strong> {{ author.name }}</p>
        {% if author.bio %}
            <p><strong>简介:</strong> {{ author.bio|truncatechars:100 }}</p>
        {% endif %}
    </div>
    
    <form method="post">
        {% csrf_token %}
        <div class="form-actions">
            <button type="submit" class="delete-button">确认删除</button>
            <a href="{% url 'author_detail' author.id %}" class="cancel-link">取消</a>
        </div>
    </form>
</body>
</html>
